//* written to stream directly
#include <boost/variant.hpp>
#include <string>
 
int main()
{
    boost::variant<double, char, std::string> v;
    v = 3.1415926;
    std::cout << v << std::endl;
    v = 'A';
    std::cout << v << std::endl;
    v = "Liang Zhang";
    std::cout << v << std::endl;
}